<?php
/*
 * mk script created on 13-mag-2005
 * jaco_at_pixeldump_dot_org
 * drawing in mk
 */

include("sample_utils.php");            // provides some utils and using mk

$sc = new MKShapeContainer();			// the shape, default shapeID is 1
$sc->add_lineStyle();					// default value is 1px line width and #000000 color
$sc->add_rect(10, 10, 300, 200); 		// a simple rectangle from x,y and width,height
$sd = $sc->update_tagData();			// get shape tag
$po = $sc->update_place_tagData();		// get placing data

$swf = new MKSwf("test_draw01.swf");	// start a fresh swf
$swf->set_swfDir(SERVER_MKTMP);			// change default working dir
$swf->set_backgroundColor("#EEEEFF");   // set background color
$swf->add_tagData($sd);                 // populate with shape
$swf->add_tagData($po);                 // place on stage
$swf->swf_output();                     // save to disk

$swfHeader = $swf->fetch_assoc();

$str = render_swf_box($swfHeader, $imgDir, false);
$str .= "<br/><strong>test_draw01.swf created in" .SERVER_MKTMP ."</strong>";
echo show_content($str, basename(__FILE__));
?>
